﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>

<td class="firstTd">
			<div class="divfixed">
				<table cellspacing="0" cellpadding="0" >
					<tr class="firthead">
                     <td style="width:50px;">
							<strong>STT</strong>
						</td>
						<td>
							<div class="Event">SK</div>
						</td>
                       
						<td>
							<div class="Date">Ngày Bán</div>
						</td>
					</tr>
                    <tr>
                    <td style="width:50px;"></td>
						<td>
							<div class="Thumb">
                              <a href="Search_Advanced.aspx" id="Search_Advanced"><img src="<%: Url.Content("~/Content/images/search.png") %>" alt="" height="20" /></a>
                            </div>
						</td>
                        
						<td>
							<div class="Thumb">
                            <select name="ddlNgayBan" id="ddlNgayBan" onchange = "javascript:LoadSearch('NgayBan',value)" style="width:90px">
                                <% List<Data.DBOES.NhatKyBanHang> objList1 = (List<Data.DBOES.NhatKyBanHang>)ViewData["NgayBan"];
                                   if (objList1.Count > 0)
                                   {
                                       foreach (var obj in objList1)
                                       {
                                           if (obj.NgayBan != null)
                                           {
                                    %>
                                    <option value="<%= obj.NgayBan %>"><%= ((DateTime)obj.NgayBan).ToString("dd/MM/yyyy")%></option>
                                    <%
}
                                           else
                                           { 
                                            %>
                                    <option value="<%= obj.NgayBan %>"><%= obj.NgayBan%></option>
                                    <%
                                           }
                                        }
                                   }
                                     %>
                            </select>
                                
                            
                            </div>
						</td>
						
					</tr>
				</table>
			</div>
		</td>
<td>
			<div class="divHeader">
				<table cellspacing="0" cellpadding="0" >
					<tr>
						<td>
							<div class="tableHeader">Chủ Hàng</div>
						</td>
						<td>
							<div class="tableHeader">Địa Chỉ</div>
						</td>
						<td>
							<div class="tableHeader">Phân loại</div>
						</td>
						<td>
							<div class="tableHeader">Tiền Muối Nhập</div>
						</td>
						<td>
							<div class="tableHeader">Trả tiền muối nhập </div>
						</td>
                        <td>
							<div class="tableHeader">Xe Tăng Bo</div>
						</td>
                        <td>
							<div class="tableHeader">Cước Tăng Bo</div>
						</td>
                        <td>
							<div class="tableHeader">TT Cước TB</div>
						</td>
                        <td>
							<div class="tableHeader">Trả cước T/B</div>
						</td>
                        <td>
							<div class="tableHeader">Địa Điểm TB</div>
						</td>
                        <td>
							<div class="tableHeader">Số Lượng</div>
						</td>
                        <td>
							<div class="tableHeader">Xe Vận Chuyển</div>
						</td>
                        <td>
							<div class="tableHeader">Cước VC</div>
						</td>
                         <td>
							<div class="tableHeader">TT Cước VC</div>
						</td>
                        <td>
							<div class="tableHeader">Trả cước VC</div>
						</td>
                         <td>
							<div class="tableHeader">Sản Phẩm</div>
						</td>
                         <td>
							<div class="tableHeader">Giá Nhập</div>
						</td>
                         <td>
							<div class="tableHeader">BB+BV</div>
						</td>
                         <td>
							<div class="tableHeader">Tổng Giá Nhập</div>
						</td>
                         <td>
							<div class="tableHeader">TT Nhập</div>
						</td>
                         <td>
							<div class="tableHeader">Nhập Xuất</div>
                        </td>
                        <td>
							<div class="tableHeader">Giá Xuất</div>
						</td>
                         <td>
							<div class="tableHeader">Thành tiền xuất</div>
						</td>
                         <td>
							<div class="tableHeader">Bên Trả VC</div>
						</td>
                         <td>
							<div class="tableHeader">Số tiền phải Thu</div>
						</td>
                         <td>
							<div class="tableHeader">Khách hàng</div>
						</td>
                         <td>
							<div class="tableHeader">Thanh toán</div>
						</td>
                         <td>
							<div class="tableHeader">Hình thức TT</div>
						</td>
                         <td>
							<div class="tableHeader">Nợ lại</div>
						</td>
                         <td>
							<div class="tableHeader">Doanh thu</div>
						</td>
                         <td>
							<div class="tableHeader">Diễn giải</div>
						</td>
					</tr>
                    <tr class="Search">
                    <td>
							<div class="Thumb">
                            <%: Html.DropDownList("ddlChuHang", new SelectList((IEnumerable)ViewData["ChuHang"], "ChuHang", "ChuHang"), new { onchange = "javascript:LoadSearch('ChuHang',value)", style = "width:190px;" })%>
                            
                                 
                            </div>
						</td>
						<td>
							<div class="Thumb">
                                 <%: Html.DropDownList("ddlDiaChi", new SelectList((IEnumerable)ViewData["DiaChi"], "DiaChi", "DiaChi"), new { onchange = "javascript:LoadSearch('DiaChi',value)", style = "width:190px;" })%>
                           </div>
						</td>
						<td>
							<div class="Thumb">
                                 <%: Html.DropDownList("ddlPL", new SelectList((IEnumerable)ViewData["PL"], "PL", "PL"), new { onchange = "javascript:LoadSearch('PL',value)", style = "width:190px" })%>
                           </div>
						</td>
						<td>
							<div class="Thumb"></div>
						</td>
						<td>
							<div class="Thumb">
                            <select name="ddlThanhToan" id="ddlThanhToan" onchange = "javascript:LoadSearch('TraTienMuoiNhap',value)" style="width:190px">
                                <% List<Data.DBOES.NhatKyBanHang> objList = (List<Data.DBOES.NhatKyBanHang>)ViewData["TraTienMuoiNhap"];
                                   if (objList.Count > 0)
                                   {
                                       foreach (var obj in objList)
                                       {
                                           if (obj.TraTienMuoiNhap != null)
                                           {
                                    %>
                                    <option value="<%= obj.TraTienMuoiNhap %>"><%= obj.TraTienMuoiNhap == true ? "R" : "C"%></option>
                                    <%
}
                                           else
                                           { 
                                            %>
                                    <option value="<%= obj.TraTienMuoiNhap %>"><%= obj.TraTienMuoiNhap%></option>
                                    <%
                                           }
                                        }
                                   }
                                     %>
                            </select>
                                
                           </div>
						</td>
                        <td>
							<div class="Thumb">
                                 <%: Html.DropDownList("ddlSoXeTangBo", new SelectList((IEnumerable)ViewData["SoXeTangBo"], "SoXeTangBo", "SoXeTangBo"), new { onchange = "javascript:LoadSearch('SoXeTangBo',value)", style = "width:190px" })%>
                           </div>
						</td>
                        <td>
							<div class="Thumb"></div>
						</td>
                        <td>
							<div class="Thumb"></div>
						</td>
                        <td>
							<div class="Thumb">
                             <select name="ddlTraCuocTB" id="TraCuocTB" onchange = "javascript:LoadSearch('TraCuocTB',value)" style="width:190px">
                                <% List<Data.DBOES.NhatKyBanHang> objList_TraCuocTB = (List<Data.DBOES.NhatKyBanHang>)ViewData["TraCuocTB"];
                                   if (objList_TraCuocTB.Count > 0)
                                   {
                                       foreach (var obj in objList_TraCuocTB)
                                       {
                                           if (obj.TraCuocTB != null)
                                           {
                                    %>
                                    <option value="<%= obj.TraCuocTB %>"><%= obj.TraCuocTB == true ? "R" : "C"%></option>
                                    <%
}
                                           else
                                           { 
                                            %>
                                    <option value="<%= obj.TraCuocTB %>"><%= obj.TraCuocTB%></option>
                                    <%
                                           }
                                        }
                                   }
                                     %>
                            </select>
                            </div>
						</td>
                        <td>
							<div class="Thumb">
                                 <%: Html.DropDownList("ddlDiaDiemTangBo", new SelectList((IEnumerable)ViewData["DiaDiemTangBo"], "DiaDiemTangBo", "DiaDiemTangBo"), new { onchange = "javascript:LoadSearch('DiaDiemTangBo',value)", style = "width:190px" })%>
                           </div>
						</td>
                        <td>
							<div class="Thumb"></div>
						</td>
                        <td>
							<div class="Thumb">
                                 <%: Html.DropDownList("ddlSoXeVanChuyen", new SelectList((IEnumerable)ViewData["SoXeVanChuyen"], "SoXeVanChuyen", "SoXeVanChuyen"), new { onchange = "javascript:LoadSearch('SoXeVanChuyen',value)", style = "width:190px" })%>
                           </div>
						</td>
                        <td>
							<div class="Thumb"></div>
						</td>
                         <td>
							<div class="Thumb"></div>
						</td>
                        <td>
							<div class="Thumb">
                             <select name="ddlTraCuocVC" id="TraCuocVC" onchange = "javascript:LoadSearch('TraCuocVC',value)" style="width:190px">
                                <% List<Data.DBOES.NhatKyBanHang> objList_TraCuocVC = (List<Data.DBOES.NhatKyBanHang>)ViewData["TraCuocVC"];
                                   if (objList_TraCuocVC.Count > 0)
                                   {
                                       foreach (var obj in objList_TraCuocVC)
                                       {
                                           if (obj.TraCuocVC != null)
                                           {
                                    %>
                                    <option value="<%= obj.TraCuocVC %>"><%= obj.TraCuocVC == true ? "R" : "C"%></option>
                                    <%
}
                                           else
                                           { 
                                            %>
                                    <option value="<%= obj.TraCuocVC %>"><%= obj.TraCuocVC%></option>
                                    <%
                                           }
                                        }
                                   }
                                     %>
                            </div>
						</td>
                         <td>
							<div class="Thumb">
                                 <%: Html.DropDownList("ddlSanPham", new SelectList((IEnumerable)ViewData["SanPham"], "SanPham", "SanPham"), new { onchange = "javascript:LoadSearch('SanPham',value)", style = "width:190px" })%>
                           </div>
						</td>
                         <td>
							<div class="Thumb"></div>
						</td>
                         <td>
							<div class="Thumb"></div>
						</td>
                         <td>
							<div class="Thumb"></div>
						</td>
                         <td>
							<div class="Thumb"></div>
						</td>
                         <td>
							<div class="Thumb">
                                <%-- <%: Html.DropDownList("ddlNhapXuat", new SelectList((IEnumerable)ViewData["NhapXuat"], "NhapXuat", "NhapXuat"), new { onchange = "javascript:LoadSearch('NhapXuat',value)", @class = "default-usage-select" })%>--%>
                           </div>
                        </td>
                        <td>
							<div class="Thumb"></div>
						</td>
                         <td>
							<div class="Thumb"></div>
						</td>
                         <td>
							<div class="Thumb">
                                 <%: Html.DropDownList("ddlBenTraVanChuyen", new SelectList((IEnumerable)ViewData["BenTraVanChuyen"], "BenTraVanChuyen", "BenTraVanChuyen"), new { onchange = "javascript:LoadSearch('BenTraVanChuyen',value)", style = "width:190px" })%>
                           </div>
						</td>
                         <td>
							<div class="Thumb"></div>
						</td>
                         <td>
							<div class="Thumb">
                                 <%: Html.DropDownList("ddlKhachHang", new SelectList((IEnumerable)ViewData["KhachHang"], "IdMembership", "MembershipName"), new { onchange = "javascript:LoadSearch('KhachHang',value)", style = "width:190px" })%>
                           </div>
						</td>
                         <td>
							<div class="Thumb"></div>
						</td>
                         <td>
							<div class="Thumb"></div>
						</td>
                        <td>
							<div class="Thumb"></div>
						</td>
                        <td>
							<div class="Thumb"></div>
						</td>
                         <td>
							<div class="Thumb">
                                 <%: Html.DropDownList("ddlGhiChu", new SelectList((IEnumerable)ViewData["GhiChu"], "GhiChu", "GhiChu"), new { onchange = "javascript:LoadSearch('GhiChu',value)", style = "width:190px" })%>
                           </div>
						</td>					
					</tr>
				</table>
			</div>
		</td>